package day9;

/**
 * @author oldliu
 * @since 1.0
 */
public class USBTest {
    public static void main(String[] args) {
        //USB c2=new USB();
        USB c=new USBCooler("杨子",59);
        c.start();
        USBCooler ub=(USBCooler)c;
        ub.makeCold();
        c.stop();
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        USB pan=new USBStore("金士顿",16);
        ((USBStore) pan).show();//
        //pan.readAndWrite();

        pan.start();
        pan.stop();
        System.out.println(">>>>>>>>>>>>>>>>");
        Storage s=new USBStore("朗科",32);
        s.read();
        s.write(44);
        USB usb=(USB)s;

        usb.start();
        usb.stop();

//        USBCooler c=new USBCooler("杨子",59);
//        c.start();
//        c.makeCold();
//        c.stop();
    }
}
